package com.lagou.rpc.consumer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.server.ConfigurableWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;

/**
 * WebServerFactoryCustomizer也就是一种定制器类：需要通过新建自定义的WebServerFactoryCustomizer类来实现属性配置修改。
 */
@SpringBootApplication
public class ClientBootstrapApplication implements WebServerFactoryCustomizer<ConfigurableWebServerFactory> {


    public static void main(String[] args) {
        SpringApplication.run(ClientBootstrapApplication.class, args);
    }

    /**
     * 设置服务端口
     */
    @Override
    public void customize(ConfigurableWebServerFactory factory) {
        factory.setPort(8088);
    }
}
